package com.caozhi.mspeoject.nb_message.controller.admin;


import com.caozhi.mspeoject.nb_message.service.admin.AdminMediaService;
import com.woniuxy.boot.common.bean.Media;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("admin/media")
public class MediaController {
    @Autowired
    private AdminMediaService adminMediaService;
    @GetMapping("getMediaByMessageId")
    public List<Media> getMediaByMessageId(@RequestParam("messageId") Long messageId) {
        return  adminMediaService.getMediaByMessageId(messageId);
    }
}
